package com.chenva;

import cn.hutool.core.util.RandomUtil;

import java.util.TimerTask;

public class DemoTimerTask extends TimerTask {
    @Override
    public void run() {
        int i = RandomUtil.randomInt(3);
        if (i == 1) {
            throw new RuntimeException("随机抛出异常");
        }
        System.out.println("i: " + i);
    }
}
